#!/usr/bin/env python
# coding=utf-8
"""
输入 IEEE754 标准的十六进制字符串
返回 十进制字符串
"""

def main():
    ie3 = (bin(int(input("Enter IEEE754 float: "), 16))[2:]).rjust(32, "0")
    sign0 = ie3[0]
    sign1 = ie3[1:9]
    sign2 = ie3[9:]

    e = int(sign1, 2) -127
    m1 = "1" + sign2[:e]
    m2 = sign2[e:]
    
    dec, frac = bin2dec(m1), bin2frac(m2)
    if sign0 == "0": print("+" + str(dec) + "." + str(frac)[2:])
    if sign0 == "1": print("-" + str(dec) + "." + str(frac)[2:])


def bin2dec(m1):
    dec = 0
    for i in range(len(m1)):
        dec += int(m1[i]) * pow(2, (len(m1)-i-1))
    return dec


def bin2frac(m2):
    frac = 0
    for i in range(len(m2)):
        frac += int(m2[i]) * (1 / pow(2, (i+1)))
    return frac


if __name__ == "__main__":
    main()
